package com.mlk.engUser.api;

import com.mlk.core.component.page.Pager;
import com.mlk.core.util.ServerResponse;
import com.mlk.engUser.po.EngUserRemainVerify;
import com.mlk.engUser.service.EngUserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.math.BigDecimal;

/**
 * 用户提现
 */
@RequestMapping("/api/eng/userRemain")
@RestController
public class EngUserRemainAPI {

    @Resource
    private EngUserService engUserService;

    /**
     * 提现申请
     * @return
     */
    @PostMapping("applyRemain")
    public ServerResponse applyRemain(String openId, BigDecimal amount,Integer cardId){
        return this.engUserService.applyRemain(openId,amount,cardId);
    }

    /**
     * 提现申请列表
     *  参数 : openId
     * @return
     */
    @GetMapping("verifyList")
    public Pager verifyList(EngUserRemainVerify bean){
        return this.engUserService.verifyList(bean);
    }
}
